Package-level declarations

Types

Link copied to clipboard
@Serializable
data class EncryptedCredentials(val data: String, val hash: String, val secret: String)

Describes data required for decrypting and authenticating EncryptedPassportElement. See the Telegram Passport Documentation for a complete description of the data decryption and authentication processes.

Link copied to clipboard
@Serializable
data class EncryptedPassportElement(val type: EncryptedPassportElementType, val data: String? = null, val phoneNumber: String? = null, val email: String? = null, val files: List<PassportFile>? = null, val frontSide: PassportFile? = null, val reverseSide: PassportFile? = null, val selfie: PassportFile? = null, val translation: List<PassportFile>? = null, val hash: String)

Describes documents or other Telegram Passport elements shared with the bot by the user.

Link copied to clipboard
@Serializable
data class PassportData(val data: List<EncryptedPassportElement>, val credentials: EncryptedCredentials)

Describes Telegram Passport data shared with the bot by the user.

Link copied to clipboard
@Serializable
sealed class PassportElementError
Link copied to clipboard
@Serializable
data class PassportFile(val fileId: String, val fileUniqueId: String, val fileSize: Int, val fileDate: Instant)

This object represents a file uploaded to Telegram Passport. Currently all Telegram Passport files are in JPEG format when decrypted and don't exceed 10MB.